#include <time.h>
#include <math.h>


#define GET_ARRAY_LEN(array,len) len = (sizeof(array) / sizeof(array[0]))    				/* Get the length of an array */

double fun_callback(function_info* funInfo, double x);

double left_rect_method(function_info* funInfo, double lower_limit, double upper_limit, double step);

double trapezoid_method(function_info* funInfo, double lower_limit, double upper_limit, double step);

double gauss_5p_method(function_info *funInfo, double lower_limit, double upper_limit);

double mc_method(function_info* funInfo, double lower_limit, double upper_limit, int num_of_experiment, int num_of_part);

void get_ymin_ymax(function_info* funInfo,double lower_limit, double upper_limit, double extrenum[], double step);

double random(double lower_limit, double upper_limit);
